package com.qianli.cashmama.trade.dao.impl;

import com.fqgj.common.api.Page;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.qianli.cashmama.trade.dao.POrderPrePaymentDao;
import com.qianli.cashmama.trade.entity.POrderPrePaymentEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class POrderPrePaymentDaoImpl extends AbstractBaseMapper<POrderPrePaymentEntity> implements POrderPrePaymentDao {


    @Override
    public List<POrderPrePaymentEntity> selectPrePaymentOrder(POrderPrePaymentEntity prePaymentParam, Page page) {
        Map<String, Object> paramMap = Maps.newHashMap();
        paramMap.put("prePaymentParam", prePaymentParam);
        if (page != null) {
            page.setTotalCount(this.selectPrePaymentOrderCount(prePaymentParam));
            paramMap.put("page", page);
        }
        return getSqlSession().selectList(this.getStatement("selectPrePaymentOrder"), paramMap);
    }


    private Integer selectPrePaymentOrderCount(POrderPrePaymentEntity prePaymentParam) {
        Map<String, Object> paramMap = Maps.newConcurrentMap();
        paramMap.put("prePaymentParam", prePaymentParam);
        return getSqlSession().selectOne(this.getStatement("selectPrePaymentOrderCount"), paramMap);
    }

    @Override
    public Integer deleteByPrimaryKey(Long aLong) {
        return null;
    }

    @Override
    public POrderPrePaymentEntity insert(POrderPrePaymentEntity pOrderPrePaymentEntity) {
        return null;
    }

    @Override
    public POrderPrePaymentEntity selectByPrimaryKey(Long aLong) {
        return null;
    }

    @Override
    public Integer updateByPrimaryKey(POrderPrePaymentEntity pOrderPrePaymentEntity) {
        return null;
    }

    @Override
    public List<POrderPrePaymentEntity> selectByParams(Map<String, Object> map) {
        return null;
    }

    @Override
    public Integer queryTotal(Map<String, Object> map) {
        return null;
    }
}
